<?php

class ActionDetails extends BaseAction
{
    public function run()
    {    
        $iContactId = Yii::app()->request->getParam('contact_id');
	    
        if ($iContactId)
        {
            $oContact = Contact::model()->findByPk($iContactId);
        }
        else
        {
            Yii::app()->controller->redirect(Yii::app()->controller->createUrl('/admin/contacts'));
        }

        $this->template->oContact = $oContact;
    }
}